<?php

class User_info_model extends CI_Model {


    function __construct()
    {
        parent::__construct();
    }

    public function insert($user_info, $uid)
    {
        $data = array('uid' => $uid,
                      'phone' => $user_info['phone'],
                      'name' => $user_info['name'],
                      'address' => $user_info['address'],
                      );
        $this->db->insert('user_info', $data);
    }

    public function get_by_uid($uid)
    {
        $query = $this->db->get_where('user_info', array('uid'=>$uid), 1);
        return $query->row();
    }
}
